package com.nulldev.util.concurrency.threadIt.v4.emapi.extensions;

import java.util.List;
import java.util.Queue;

public interface IExecutorUnwinder {

	public static final IExecutorUnwinder STUB = new IExecutorUnwinder() {

		@Override
		public void newTask(final Runnable r, final boolean isBatched) {
		}

		@Override
		public void newTasks(Runnable... r) {
		}

		@Override
		public void newTasks(List<Runnable> r) {
		}

		@Override
		public void newTasks(Queue<Runnable> x, int amount) {
		}
	};

	public default void newTask(final Runnable r) {
		this.newTask(r, false);
	}

	public void newTask(final Runnable r, final boolean isBatched);

	public void newTasks(final Runnable... r);

	public void newTasks(final List<Runnable> r);

	public void newTasks(final Queue<Runnable> x, final int amount);
}
